//
//  MCWithdrawRecDeltailViewController.m
//  TLYL
//
//  Created by miaocai on 2017/7/10.
//  Copyright © 2017年 TLYL01. All rights reserved.
//

#import "MCWithdrawRecDeltailViewController.h"
#import "MCBankTableViewController.h"

@interface MCWithdrawRecDeltailViewController ()
@property (weak, nonatomic)  UILabel *moneyLabel;
@property (weak, nonatomic)  UIButton *allBtn;
@property (weak, nonatomic)  UITextField *nameTextField;
@property (weak, nonatomic)  UITextField *passwordTextField;

@property (weak, nonatomic)  UIButton *withdrawBtn;
@property (weak, nonatomic)  UIButton *bankBtn;

@end

@implementation MCWithdrawRecDeltailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setUpUI];
    self.navigationItem.title = @"提款";
    self.view.backgroundColor = [UIColor whiteColor];
 
}

- (void)setUpUI{
    UILabel *jinELabel = [[UILabel alloc] init];
    jinELabel.textColor = [UIColor blueColor];
    [self.view addSubview:jinELabel];
    jinELabel.textAlignment = NSTextAlignmentCenter;
    jinELabel.text = @"327，89";
    jinELabel.font = [UIFont systemFontOfSize:MC_REALVALUE(25)];
    
    UILabel *jinEDetailLabel = [[UILabel alloc] init];
    jinEDetailLabel.textColor = [UIColor darkGrayColor];
    [self.view addSubview:jinEDetailLabel];
    jinEDetailLabel.text = @"账户余额(元)";
    jinEDetailLabel.font = [UIFont systemFontOfSize:MC_REALVALUE(14.0f)];
    
    UIButton *bankBtn = [[UIButton alloc] init];
    [self.view addSubview:bankBtn];
    [bankBtn setTitle:@"中国工商银行" forState:UIControlStateNormal];
    [bankBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    bankBtn.titleLabel.font = [UIFont systemFontOfSize:MC_REALVALUE(20)];
    bankBtn.backgroundColor = RGB(243, 243, 243);
    [bankBtn addTarget:self action:@selector(bankBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    
    UIView *lineView1 = [[UIView alloc] init];
    [self.view addSubview:lineView1];
    lineView1.backgroundColor = [UIColor darkGrayColor];
    
    UILabel *labelRMB = [[UILabel alloc] init];
    labelRMB.text = @"¥";
    labelRMB.textColor = [UIColor blackColor];
    labelRMB.font = [UIFont systemFontOfSize:MC_REALVALUE(30)];
    [self.view addSubview:labelRMB];
    
    UITextField *rmbTextFiled = [[UITextField alloc] init];
    [self.view addSubview:rmbTextFiled];
    rmbTextFiled.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"单笔提款金额范围为：10-5000" attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:14],NSForegroundColorAttributeName : RGB(200, 200, 200)}];
    
    UIButton *allBtn = [[UIButton alloc] init];
    [self.view addSubview:allBtn];
    [allBtn setTitle:@"全部转出" forState:UIControlStateNormal];
    allBtn.titleLabel.font = [UIFont systemFontOfSize:MC_REALVALUE(14)];
    [allBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [allBtn addTarget:self action:@selector(allBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    
    UITextField *nameTf = [[UITextField alloc] init];
    [self.view addSubview:nameTf];
    nameTf.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入真实姓名" attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:14],NSForegroundColorAttributeName : RGB(200, 200, 200)}];
    UIView *lineView2 = [[UIView alloc] init];
    [self.view addSubview:lineView2];
    lineView2.backgroundColor = [UIColor darkGrayColor];
    
    UITextField *pwdTf = [[UITextField alloc] init];
    [self.view addSubview:pwdTf];
    pwdTf.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入资金密码" attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:14],NSForegroundColorAttributeName : RGB(200, 200, 200)}];
    
    UIButton *tikuanBtn = [[UIButton alloc] init];
    [self.view addSubview:tikuanBtn];
    [tikuanBtn setTitle:@"提款" forState:UIControlStateNormal];
    tikuanBtn.titleLabel.font = [UIFont systemFontOfSize:MC_REALVALUE(14)];
    [tikuanBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [tikuanBtn addTarget:self action:@selector(withdrawBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    
    tikuanBtn.backgroundColor = [UIColor blueColor];
    UILabel *infoLabel = [[UILabel alloc] init];
    infoLabel.text = @"取款到账时间为1-5分钟，取款时间为：全天24小时";
    infoLabel.textAlignment = NSTextAlignmentCenter;
    infoLabel.textColor = [UIColor blackColor];
    infoLabel.font = [UIFont systemFontOfSize:MC_REALVALUE(12)];
    [self.view addSubview:infoLabel];
    
    [jinELabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view).offset(MC_REALVALUE(10));
        make.top.equalTo(self.view).offset(MC_REALVALUE(84));
       
    }];
    [jinEDetailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(jinELabel.mas_right);
        make.top.bottom.equalTo(jinELabel);
    }];

    [bankBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(self.view);
        make.top.equalTo(jinELabel.mas_bottom).offset(MC_REALVALUE(10));
        make.height.equalTo(@(44));
    }];
    
    [lineView1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(self.view);
        make.top.equalTo(bankBtn.mas_bottom);
        make.height.equalTo(@(0.5));
    }];
    [labelRMB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view);
        make.top.equalTo(lineView1.mas_bottom);
        make.height.equalTo(@(MC_REALVALUE(64)));
        make.width.equalTo(@(40));
        
    }];
    labelRMB.backgroundColor = RGB(243, 243, 243);
    rmbTextFiled.backgroundColor = RGB(243, 243, 243);
    allBtn.backgroundColor = RGB(243, 243, 243);
    nameTf.backgroundColor = RGB(243, 243, 243);
    pwdTf.backgroundColor = RGB(243, 243, 243);
    [rmbTextFiled mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(labelRMB);
        make.left.equalTo(labelRMB.mas_right);
        make.height.equalTo(@(MC_REALVALUE(64)));
        
    }];
    
    [allBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.view);
        make.centerY.equalTo(rmbTextFiled);
        make.left.equalTo(rmbTextFiled.mas_right);
        make.height.equalTo(@(MC_REALVALUE(64)));
    }];
    
    [nameTf mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(self.view);
        make.top.equalTo(rmbTextFiled.mas_bottom).offset(2);
        make.height.equalTo(@(44));
    }];
    [lineView2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(self.view);
        make.top.equalTo(nameTf.mas_bottom);
        make.height.equalTo(@(0.5));
    }];
    [pwdTf mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(self.view);
        make.top.equalTo(lineView2.mas_bottom);
        make.height.equalTo(@(44));
    }];
    
    [tikuanBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view).offset(MC_REALVALUE(20));
        make.right.equalTo(self.view).offset(-MC_REALVALUE(20));
        make.height.equalTo(@(50));
        make.top.equalTo(pwdTf.mas_bottom).offset(44);
    }];
    
    [infoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(self.view).offset(MC_REALVALUE(20));
    }];
    
}
- (void)withdrawBtnClick:(UIButton *)sender {
}

- (void)allBtnClick:(UIButton *)sender {
}
- (void)bankBtnClick:(UIButton *)sender {
    
    MCBankTableViewController *bankTc = [[MCBankTableViewController alloc] init];
    bankTc.bankTableViewDidselectedBlock = ^(NSString *str){
    
        NSLog(@"%@",str);
    };
    [self.navigationController pushViewController:bankTc animated:YES];
    
}


@end
